{template '_header'}

<div class="page-header">
    当前位置：<span class="text-primary">网站设置</span>
</div>

<div class="page-content">

    <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data" >

        <div class="form-group">
            <label class="col-lg control-label">网站状态</label>
            <div class="col-sm-9 col-xs-12">
                {ife 'system.site' $data}
                    <label class='radio-inline'><input type='radio' name='data[status]' value='1' {if $data['status']==1}checked{/if} /> 开启</label>
                    <label class='radio-inline'><input type='radio' name='data[status]' value='0' {if $data['status']==0}checked{/if} /> 关闭</label>
                {else}
                    <div class='form-control-static'>{if empty($item['status'])}关闭{else}开启{/if}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">网站入口</label>
            <div class="col-sm-9 col-xs-12">
                <p class='form-control-static'><a href='javascript:;' class="js-clip" title='点击复制连接' data-url="{php echo $_SERVER['SERVER_NAME'].'/pcsite/'}" >{php echo $_SERVER['SERVER_NAME'].'/pcsite/'}</a></p>
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">网站模板选择</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'sysset.template.edit'}
                    <select class='form-control' name='data[template]'>
                        {loop $styles  $style}
                        <option value='{$style}' {if $style==$data['template']}selected{/if}>{$style}</option>
                        {/loop}
                    </select>
                {else}
                    <input type="hidden" name="data[template]" value="{$data['template']}"/>
                    <div class='form-control-static'>
                        {if empty($data['template'])}default{else}{$data['template']}{/if}
                    </div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">网站关闭后跳转的连接</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="text" name="data[closeurl]" class="form-control" value="{$data['closeurl']}" />
                {else}
                    <input type="hidden" name="data[closeurl]" value="{$data['closeurl']}"/>
                    <div class='form-control-static'>{$data['closeurl']}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">网站名称</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="text" name="data[title]" class="form-control" value="{$data['title']}" />
                {else}
                    <input type="hidden" name="data[title]" value="{$data['title']}"/>
                    <div class='form-control-static'>{$data['title']}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">网站LOGO</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    {php echo tpl_form_field_image2('data[logo]', $data['logo'])}
                    <span class='help-block'>建议尺寸:300*100</span>
                {else}
                    <input type="hidden" name="data[logo]" value="{$data['logo']}"/>
                    {if !empty($data['logo'])}
                        <a href='{php echo tomedia($data['logo'])}' target='_blank'>
                            <img src="{php echo tomedia($data['logo'])}" style='width:100px;border:1px solid #ccc;padding:1px' />
                        </a>
                    {/if}
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">微信二维码</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    {php echo tpl_form_field_image2('data[qrcode]', $data['qrcode'])}
                    <span class='help-block'>建议尺寸:140*140</span>
                {else}
                    <input type="hidden" name="data[qrcode]" value="{$data['qrcode']}"/>
                    {if !empty($data['qrcode'])}
                        <a href="{php echo tomedia($data['qrcode'])}" target='_blank'>
                            <img src="{php echo tomedia($data['qrcode'])}" style='width:100px;border:1px solid #ccc;padding:1px' />
                        </a>
                    {/if}
                {/if}
            </div>
        </div>


        <div class="form-group">
            <label class="col-lg control-label">网站关键词</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="text" name="data[keywords]" class="form-control" value="{$data['keywords']}" />
                {else}
                    <input type="hidden" name="data[keywords]" value="{$data['keywords']}"/>
                    <div class='form-control-static'>{$data['keywords']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">网站简介</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <textarea name="data[description]" class="form-control richtext" rows="5">{$data['description']}</textarea>
                {else}
                    <textarea name="data[description]" class="form-control richtext" rows="5" style="display:none">{$data['description']}</textarea>
                    <div class='form-control-static'>{$data['description']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">首页案例展示副标题</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <textarea name="data[casesubtitle]" class="form-control richtext" rows="5">{$data['casesubtitle']}</textarea>
                {else}
                    <textarea name="data[casesubtitle]" class="form-control richtext" rows="5" style="display:none">{$data['casesubtitle']}</textarea>
                    <div class='form-control-static'>{$data['casesubtitle']}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">首页新闻动态副标题</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <textarea name="data[newsubtitle]" class="form-control richtext" rows="5">{$data['newsubtitle']}</textarea>
                {else}
                    <textarea name="data[newsubtitle]" class="form-control richtext" rows="5" style="display:none">{$data['newsubtitle']}</textarea>
                    <div class='form-control-static'>{$data['newsubtitle']}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">首页最新文章副标题</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <textarea name="data[articlesubtitle]" class="form-control richtext" rows="5">{$data['articlesubtitle']}</textarea>
                {else}
                    <textarea name="data[articlesubtitle]" class="form-control richtext" rows="5" style="display:none">{$data['articlesubtitle']}</textarea>
                    <div class='form-control-static'>{$data['articlesubtitle']}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">首页友情链接副标题</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <textarea name="data[linksubtitle]" class="form-control richtext" rows="5">{$data['linksubtitle']}</textarea>
                {else}
                    <textarea name="data[linksubtitle]" class="form-control richtext" rows="5" style="display:none">{$data['linksubtitle']}</textarea>
                    <div class='form-control-static'>{$data['linksubtitle']}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">首页联系我们副标题</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                <textarea name="data[contactsubtitle]" class="form-control richtext" rows="5">{$data['contactsubtitle']}</textarea>
                {else}
                <textarea name="data[contactsubtitle]" class="form-control richtext" rows="5"style="display:none">{$data['contactsubtitle']}</textarea>
                <div class='form-control-static'>{$data['contactsubtitle']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">联系人</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="text" name="data[contacts]" class="form-control" value="{$data['contacts']}" />
                {else}
                    <input type="hidden" name="data[contacts]" value="{$data['contacts']}"/>
                    <div class='form-control-static'>{$data['contacts']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">联系方式</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="text" name="data[mobile]" class="form-control" value="{$data['mobile']}" />
                {else}
                    <input type="hidden" name="data[mobile]" value="{$data['mobile']}"/>
                    <div class='form-control-static'>{$data['mobile']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">服务时间</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="text" name="data[servertime]" class="form-control" value="{$data['servertime']}" />
                {else}
                    <input type="hidden" name="data[servertime]" value="{$data['servertime']}"/>
                    <div class='form-control-static'>{$data['servertime']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">客服QQ</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="text" name="data[qq]" class="form-control" value="{$data['qq']}" />
                {else}
                    <input type="hidden" name="data[qq]" value="{$data['qq']}"/>
                    <div class='form-control-static'>{$data['qq']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">联系地址</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="text" name="data[address]" class="form-control" value="{$data['address']}" />
                {else}
                    <input type="hidden" name="data[address]" value="{$data['address']}"/>
                    <div class='form-control-static'>{$data['name']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">邮编</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="text" name="data[zipcode]" class="form-control" value="{$data['zipcode']}" />
                {else}
                    <input type="hidden" name="data[zipcode]" value="{$data['zipcode']}"/>
                    <div class='form-control-static'>{$data['zipcode']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">底部版权</label>
            <div class="col-sm-9">
                {php echo tpl_ueditor('data[copyright]',$data['copyright'])}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">全局统计代码</label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <textarea name="data[diycode]" class="form-control richtext" rows="5">{$data['diycode']}</textarea>
                {else}
                    <textarea name="data[diycode]" class="form-control richtext" style="display:none"  rows="5">{$data['diycode']}</textarea>
                    <div class='form-control-static'>{$data['diycode']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label"></label>
            <div class="col-sm-9 col-xs-12">
                {ifp 'system.site'}
                    <input type="submit" value="提交" class="btn btn-primary"  />
                {/if}
            </div>
        </div>
    </form>

</div>

{template '_footer'}